<?php
/**
 * Created by PhpStorm.
 * User: lijiao
 * Date: 15/6/28
 * Time: 下午1:37
 */

namespace app\models;


use yii\db\ActiveRecord;

class Customer extends ActiveRecord
{
    public function getOrders()
    {
        $orders = $this->hasMany(Order::className(),['customer_id'=>'id'])->asArray()->all();
        return $orders;
    }
}